|
RAIS
3.2
|
00001 using System; 00002 using System.Collections.Generic; 00003 using System.Text; 00004 00005 namespace RAIS.Common.RADEVSearchClasses 00006 { 00007 public class RADEVRow 00008 { 00009 #region Fields 00010 int _id; 00011 string _eventID; 00012 string _facilitiName; 00013 string _eventDate; 00014 string _radiotionsource; 00015 00016 List<string> _specificPractice = new List<string>(); 00017 00018 List<string> _reportStatus = new List<string>(); 00019 #endregion 00020 #region Properties 00021 00022 00023 00024 public int Id 00025 { 00026 get { return _id; } 00027 set { _id = value; } 00028 } 00032 public string EventID 00033 { 00034 get { return _eventID; } 00035 } 00039 public string FacilitiName 00040 { 00041 get { return _facilitiName; } 00042 } 00046 public string EventDate 00047 { 00048 get { return _eventDate; } 00049 } 00053 public string Radiotionsource 00054 { 00055 get { return _radiotionsource; } 00056 } 00060 public string SpecificPractice 00061 { 00062 get 00063 { 00064 return GetValuesString(_specificPractice); 00065 } 00066 } 00070 public string ReportStatus 00071 { 00072 get { return GetValuesString(_reportStatus); } 00073 } 00074 #endregion 00075 #region Constructors 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 public RADEVRow(int id, string eventID, string facilitiName, string eventDate, string radiotionsource, string specificPractice, string reportStatus) 00087 { 00088 _id = id; 00089 _eventID = eventID; 00090 _facilitiName = facilitiName; 00091 _eventDate = eventDate; 00092 _radiotionsource = radiotionsource; 00093 _specificPractice.Add(specificPractice); 00094 _reportStatus.Add(reportStatus); 00095 } 00096 #endregion 00097 #region Public methods 00098 00099 00100 00101 00102 00103 public void AddRADEV(string specificPractice, string reportStatus) 00104 { 00105 if (!_specificPractice.Contains(specificPractice)) 00106 _specificPractice.Add(specificPractice); 00107 if (!_reportStatus.Contains(reportStatus)) 00108 _reportStatus.Add(reportStatus); 00109 } 00110 #endregion 00111 #region Private methods 00112 private string GetValuesString(List<string> values) 00113 { 00114 StringBuilder strBuild = new StringBuilder(); 00115 foreach (string str in values) 00116 { 00117 strBuild.Append(str + ", "); 00118 } 00119 string retString=strBuild.ToString(); 00120 return retString.Substring(0, retString.Length - 2); 00121 } 00122 #endregion 00123 } 00124 }